package com.qf.cm.controller;

import com.qf.cm.pojo.Stage;
import com.qf.cm.service.StageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Description: 公用常量
 * @Data: 2022/9/7 20:07
 * @Pacakge: com.qf.cm.controller
 * @ClassName: StageController
 * @Author: fan
 */
@Controller
@RequestMapping("stage")
public class StageController {
    @Autowired
    private StageService stageService;
    @RequestMapping("findStageBySname")
    public ModelAndView findStageBySname(String sname){
        ModelAndView modelAndView = new ModelAndView();
        Stage stage = stageService.findStageBySname(sname);
        modelAndView.setViewName("pages/stage/stage");
        modelAndView.addObject("stage",stage);
        return modelAndView;
    }
}
